<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
    <title>美策平台</title>
    <link rel="icon" type="image/png" href="/img/icon.png">
    <link rel="stylesheet" type="text/css" href="../../datepicker/jquery-ui.min.css">
    <link rel="stylesheet" type="text/css" href="../../css/app.css">
    <link rel="stylesheet" type="text/css" href="../../css/my.css">
    <script type="text/javascript" src="../../js/jquery.min.js"></script>
    <script type="text/javascript" src="/pc/js/all.js"></script>
</head>
<body>
<!--
    制作者：九哥
    页面：企业招聘列表
    时间：2019-03-23
    更新：
-->





<!----------工人应聘---------->
<div id="staffJobPage">
    <div id="staffJobTitle">
        <b>工人应聘</b>
        <img src="../../images/return.png" id="staffJobRtn">
    </div>
    <div class="tablelist" id="joblist">
        <div class="load">努力加载中...</div>
    </div>
</div>
<!----------工人应聘---------->





<!----------错误提示---------->
<div id="errMsg"></div>
<!----------错误提示---------->
</body>
<script type="text/javascript" src="../../js/app.js"></script>
<script type="text/javascript" src="../../js/mysetPageChange.js"></script>
<script type="text/javascript" src="../../js/myset2.js"></script>
<script>
    (function(){
        getJobList();
    })();
    function getJobList(){
        var userInfo = cacheGet('userInfo'); //获取用户信息
        if (userInfo==null || userInfo.token=='undefined') {
            window.location.href = '/h5/login/login.html';
        }
        var data = {
            app_access:app_access,
            token:userInfo.token,
            type:userInfo.type,
            cate:userInfo.cate
        };
        $.ajax({
            type:'post',
            url:getDomain() + '/company-get',
            data:data,
            success:function(res){
                if (res.code!=0) {
                    $('.load').html('暂无招聘信息');
                    return false;
                }
                var data = res.data;
                var i, h = '';
                for (i=0;i<data.length;i++) {
                    h += '<table>';
                    h +=    '<tr>';
                    h +=        '<td>';
                    if (data[i].userHead) {
                        h += '<img src="'+data[i].userHead+'" width="60">';
                    } else {
                        h += '<img src="../images/toux01.png" width="60">';
                    }
                    h +=        '</td>';
                    h +=        '<td>';
                    h +=            '<p>';
                    h +=                '<b onclick="toJobShow('+data[i].uid+')">'+data[i].uname+'</b>';
                    h +=                '<span>'+data[i].statusName+'</span>';
                    h +=            '</p>';
                    h +=            '<small>'+data[i].detail.substring(0,10)+'..</small>.';
                    h +=            '<span onclick="sendInvite('+data[i].uid+')">邀请面试</span>';
                    h +=        '</td>';
                    h +=    '</tr>';
                    h += '</table>';
                }
                $('#joblist').html(h);
            },
            error:function(){
                console.log('操作失败！'); return;
            }
        });
    }
    function getDomain(){
        return '/api/my/job';
    }
</script>
</html>